{template 'admin','header'}
    <form action="admin/user.php?action=search" name="form"  onsubmit="return r_submit(this);">
    <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>用户查询</caption>
        <tr>
            <td  class="align_c">
                用户名称：<input type="text" size="30" name="username" value="{$username}"/>
                <input type="submit" class="button_style" value="查询"/>
            </td>
        </tr>
    </table>
    </form>
    <form action="admin/user.php?action=listorder" name="form1"  method="POST" onsubmit="return r_submit(this);">
    <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>用户管理</caption>
        <tr>
            <th width="80" class="align_c"><input type="checkbox" onclick="checkall(this,'uid')" id="chkall">全选/取消</th>
            <th width="5%">排序</th>
            <th width="5%">ID</th>
            <th>用户名称</th>
            <th>用户类型</th>
            <th>状态</th>
            <th width="320">管理操作</th>
        </tr>
        {loop $user_list $user}
        <tr>
            <td class="align_c">
                <input id="uid" name="uid[]" type="checkbox" id="checkbox"  value="{$user['userid']}"/>
            </td>
            <td class="align_c">
                <input type="text" name="listorder[{$user['userid']}]" size="2" value="{intval($user['listorder'])}"/>
            </td>
            <td class="align_c">{$user['userid']}</td>
            <td class="align_c">{$user['username']}</td>
            <td class="align_c">{$usertype_list[$user['usertype']]}</td>
            <td class="align_c">{$STATUS_LIST[$user['status']]}</td>
            <td class="align_c">
                {if check_perms('U003')===true}<a href="admin/user.php?action=upd&userid={$user['userid']}&forward={$forward}">修改</a>&nbsp;|&nbsp;{/if}
                {if check_perms('U004')===true}<a href="javascript:my_request('{format_url("admin/user.php?action=del&userid=".$user['userid'])}','确认要删除吗？')">删除</a>{/if}
            </td>
        </tr>
        {/loop}
    </table>
    <div class="button_box">
        {if check_perms('U005')===true}<input class="button_style" name="order" type="button" value=" 排序 " onclick="change_opt('form1','{$self_dir}/user.php?action=listorder')"/>{/if}
        {if check_perms('U002')===true}<input class="button_style" name="add" type="button" value=" 添加管理员 " onclick="self.location='{$self_url}?action=add&forward={$forward}'"/>{/if}
        {if check_perms('U004')===true}<input class="button_style" name="del" type="button" value=" 批量删除 " onclick="if(confirm('确定要删除选中的用户？')){change_opt('form1','{$self_dir}/user.php?action=del_all');}"/>{/if}
    </div>
    </form>
    <div id="pages">
        {$user_pages}
    </div>
{template 'admin','footer'}
